package com.beesphere.excel.writer.impls;

import java.io.Serializable;

import org.apache.poi.ss.usermodel.DataFormat;
import org.apache.poi.ss.usermodel.Workbook;

public class WorkbookContext implements Serializable {
	
	private static final long serialVersionUID = -4575416768214821986L;
	
	private Workbook workbook;
	private DataFormat dataFormat;
	
	public WorkbookContext (Workbook workbook, boolean installCustomFormats) {
		this.workbook = workbook;
		if (installCustomFormats) {
			this.dataFormat = workbook.createDataFormat();
		}
	}

	public Workbook getWorkbook() {
		return workbook;
	}

	public DataFormat getDataFormat() {
		return dataFormat;
	}
}
